package com.hulk.boot.web.interceptor;

import java.io.BufferedReader;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;



@Slf4j
public class JacksonHandlerInterceptorAdapter extends HandlerInterceptorAdapter{
	
	
	
	public final static String REQUEST_MESSAGE = "reqMsg";
	
	public final static String REQUEST_OBJECT = "reqObj";
	
	public final static String RESPONSE_MESSAGE = "resMsg";
	
	public final static String RESPONSE_OBJECT = "resObj";
	
	
	private boolean reqDecSign(String reqMsg,HttpServletRequest request,
			HttpServletResponse response, Object handler) throws RuntimeException{
		
		
		
		return true;
	}
	
	private boolean resEncSign(String reqMsg,HttpServletRequest request,
			HttpServletResponse response, Object handler) throws RuntimeException{
		
		
		
		
		
		return true;
	}
	
	
	private void writerErrorResponseWithValidation(HttpServletResponse response,  Class<?> clazz, String validationMessage) {
		
	}
	
	

	@Override
	public boolean preHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
		
		
		
		return true;
	}

	@Override
	public void postHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler,
			ModelAndView modelAndView) throws Exception {
		
		
	}

	@Override
	public void afterCompletion(HttpServletRequest request,
			HttpServletResponse response, Object handler, Exception ex)
			throws Exception {
//		AnnotationUtils.
//		ClassUtils
		//AnnotationUtils和ClassUtils使用小结
		super.afterCompletion(request, response, handler, ex);
	}

	@Override
	public void afterConcurrentHandlingStarted(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
		super.afterConcurrentHandlingStarted(request, response, handler);
	}

	
	
}
